package com.boot.repository;

import com.boot.entity.Building;
import com.boot.entity.Classroom;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import javax.persistence.criteria.CriteriaBuilder;
import javax.transaction.Transactional;

@Transactional
@Repository
public interface BuildingRepository extends JpaRepository<Building, Integer>, JpaSpecificationExecutor<Building> {

    Boolean existsByBuildingName(String buildingName);
    Building findByBuildingName(String buildingName);
    Building findByBuildingId(Integer id);
    void deleteByBuildingName(String buildingName);

}
